package br.usp.pcs.basys;

import java.util.Date;

public class Job {
	private static long instances = 0;
	private Long id = ++instances;
	private Date arrivalDate;
	private Long requiredMemorySpace;
	private Long meanRelocationTime;
	private Long meanInterrequestTime;
	private Long recordCount;
	private Long pendingRecordCount;
	private Long meanOverheadTime;
	private Long meanDiskOperationTime;
	
	@Override
	public String toString() {
		return id.toString();
	}

	public boolean hasPendingRecords(){
		return pendingRecordCount!=0L;
	}
	public void decrementRecordCount(){
		pendingRecordCount--;
	}
	public Date getArrivalDate() {
		return arrivalDate;
	}

	public void setArrivalDate(Date arrivalDate) {
		this.arrivalDate = arrivalDate;
	}

	public Long getRequiredMemorySpace() {
		return requiredMemorySpace;
	}

	public void setRequiredMemorySpace(Long requiredMemorySpace) {
		this.requiredMemorySpace = requiredMemorySpace;
	}

	public Long getMeanRelocationTime() {
		return meanRelocationTime;
	}

	public void setMeanRelocationTime(Long meanRelocationTime) {
		this.meanRelocationTime = meanRelocationTime;
	}

	public Long getMeanInterrequestTime() {
		return meanInterrequestTime;
	}

	public void setMeanInterrequestTime(Long meanInterrequestTime) {
		this.meanInterrequestTime = meanInterrequestTime;
	}

	public Long getRecordCount() {
		return recordCount;
	}

	public void setRecordCount(Long recordCount) {
		this.recordCount = recordCount;
		this.pendingRecordCount = recordCount;
	}

	public Long getMeanOverheadTime() {
		return meanOverheadTime;
	}

	public void setMeanOverheadTime(Long meanOverheadTime) {
		this.meanOverheadTime = meanOverheadTime;
	}

	public Long getMeanDiskOperationTime() {
		return meanDiskOperationTime;
	}

	public void setMeanDiskOperationTime(Long meanDiskOperationTime) {
		this.meanDiskOperationTime = meanDiskOperationTime;
	}

	public Long getId() {
		return id;
	}
}
